package pers.mobian.springninth;

import org.springframework.context.annotation.AnnotatedBeanDefinitionReader;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Date 2021/9/4 9:39
 * @Created mobian
 * @Description
 */
public class Test {
	public static void main(String[] args) {
//		MobianContext context = new MobianContext(MobianConfig.class);

		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
		AnnotatedBeanDefinitionReader reader = new AnnotatedBeanDefinitionReader(context);
		reader.register(User.class);
		context.refresh();
		User bean = (User) context.getBean("user");
		bean.show();
		System.out.println("---");
		System.out.println(bean);

		context.close();
	}
}
